home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
c
/
cm100exe.zip
/
CM100EXE.EXE
/
SAMPLES
/
C
/
MAKEFILE
< prev
next >
Wrap
Text File
|
1991-11-16
|
4KB
|
110 lines
/*****************************************************************************
* MAKEFILE
*
* PURPOSE: Build the following modules:
*
* "hello.obj"
* "world.obj"
* "message.lib"
* "greeting.obj"
* "greeting.exe"
*
* NOTE: None of the comments in this make file are required. They have
* been provided to help you understand how CMAKE handles each
* command. In other words, this make file could be reduced down to
* the following five commands:
*
* cl /c /W4 hello.c
* cl /c /W4 world.c
* lib @message.lrf
* cl /c /W4 greeting.c
* link @greeting.lnk
*
*****************************************************************************/
/*****************************************************************************
* HELLO.OBJ
*
* The following CL command will be executed only when one of the
* following conditions is true:
*
* 1. "hello.obj" does not exist.
* 2. "hello.c" is newer than "hello.obj".
* 3. "hello.h" is newer than "hello.obj".
*
*****************************************************************************/
cl /c /W4 hello.c
/*****************************************************************************
* WORLD.OBJ
*
* The following CL command will be executed only when one of the
* following conditions is true:
*
* 1. "world.obj" does not exist.
* 2. "world.c" is newer than "world.obj".
* 3. "world.h" is newer than "world.obj".
*
*****************************************************************************/
cl /c /W4 world.c
/*****************************************************************************
* MESSAGE.LIB
*
* The following LIB command will be executed only when one of the
* following conditions is true:
*
* 1. "message.lib" does not exist.
* 2. "hello.obj" is newer than "message.lib".
* 3. "world.obj" is newer than "message.lib".
*
* Actually, only those objects that are newer than the library,
* "message.lib", will be added to the library. For example, suppose
* "message.lib" exists, "hello.obj" is newer than "message.lib", and
* "world.obj" is older than "message.lib". In this case, only
* "hello.obj" must be added to the library, "message.lib". Thus, in
* this case, CMAKE would execute the following command:
*
* lib @message.clb
*
* where "message.clb" consists of the following lines:
*
* message.lib
* -+hello.obj ;
*
*****************************************************************************/
lib @message.lrf
/*****************************************************************************
* GREETING.OBJ
*
* The following CL command will be executed only when one of the
* following conditions is true:
*
* 1. "greeting.obj" does not exist.
* 2. "greeting.c" is newer than "greeting.obj".
* 3. "hello.h" is newer than "greeting.obj".
* 4. "world.h" is newer than "greeting.obj".
* 5. "greeting.h" is newer than "greeting.obj".
*
*****************************************************************************/
cl /c /W4 greeting.c
/*****************************************************************************
* GREETING.EXE
*
* The following LINK command will be executed only when one of the
* following conditions is true:
*
* 1. "greeting.exe" does not exist.
* 2. "greeting.obj" is newer than "greeting.exe".
* 3. "message.lib" is newer than "greeting.exe".
*
*****************************************************************************/
link @greeting.lnk